Home | | Latest | About | Random
# Homework 1
Problem 3.
a) Let $U\sim\text{unif}\{1,2,\ldots,n\}$. Compute $E(U^{2})$.
Note $E(U^{2})=\sum_{k=1}^{n} k^{2} P(U=k)=\frac{1}{n}\sum_{k=1}^{n}k^{2}=\frac{(n+1)(2n+1)}{6}$.
b) Since $Var(U)=E((U-EU)^{2})=E(U^{2}-2UEU+(EU)^{2})=E(U^{2})-(EU)^{2}$
So as $EU= \frac{1+2+\cdots+n}{n}=\frac{n+1}{2}$, we have $$
Var(U)=\frac{(n+1)(2n+1)}{6} - \left( \frac{n+1}{2} \right)^{2} = \frac{n^{2}-1}{12}
$$
c) If $X$ is uniformly distributed in $\{a,a+1,\ldots,b\}$ with $a < b$, then $X = a-1 +U$, where $U\sim\text{unif}\{1,2,\ldots,b-a+1\}$
So $\displaystyle Var(X) = Var(U) = \frac{(b-a+1)^2 -1}{12}$.
Problem 4.
Roll two unbiased dice, let $Y$ be max, and let $Z$ be min. Assuming 6 sided?
a) pmf for $Y$ and pmf for $Z$.
$P(Y = k) = \frac{2k-1}{36}$.
$P(Z = k) = \frac{12-(2k-1)}{36}$
Draw a picture.
b) joint pmf of $Y$ and $Z$ :$$
\begin{array}{c|ccccc}
Y \backslash Z & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline
1 & \frac{1}{36} & 0 & 0 & 0 & 0 & 0 \\
2 & \frac{2}{36} & \frac{1}{36} & 0 & 0 & 0 & 0 \\
3 & \frac{2}{36} & \frac{2}{36} & \frac{1}{36} & 0 & 0 & 0 \\
4 & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{1}{36} & 0 & 0 \\
5 & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{1}{36} & 0 \\
6 & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{2}{36} & \frac{1}{36}
\end{array}
$$
c) check joint.
Indeed, row sums corresponds to $P(Y=k)$, and column sum corresponds to $P(Z=k)$.
Problem 5.
A coin lands on heads with probability $p$. Let $Z$ be the total number of coin toss until you see a second head.
a) Find $E(Z)$.
Denote $X,Y\sim\text{i.i.d geom}(p)$, then $Z = X+Y$.
Then $E(Z) = E(X+Y) = EX + EY$ by linearity of expectation, which gives $EZ=\frac{1}{p}+\frac{1}{p} = \frac{2}{p}$.
b) Find $P(Z > 5)$.
The event $Z > 5$ is equivalent to saying among the first five toss, there is at most one head. Hence $P(Z > 5) = (1-p)^{5} + 4(1-p)^{4}p$.